import { reactive } from 'vue'
import axios from 'axios'
export default function () {
    let dogList = reactive([
        'https://images.dog.ceo/breeds/poodle-miniature/n02113799_1003.jpg'
    ])
    async function getDog() {
        try {
            let res = await axios.get('https://dog.ceo/api/breeds/image/random')
            dogList.push(res.data.message)
        } catch (error) {
            alert(error)
        }
    }
    return { dogList, getDog}
}
